package Strategy;

import java.math.BigDecimal;

/**
 * @author liuyang
 * @since 2022/6/24 18:05
 */

public class GetCashRebate implements Strategy {
    private static final BigDecimal TEN = new BigDecimal(10);
    private String disCount;

    public GetCashRebate(String disCount) {
        this.disCount = disCount;
    }

    @Override
    public String payMoney(String money) {
        BigDecimal payMoney = new BigDecimal(money).multiply(new BigDecimal(disCount).divide(TEN));
        return payMoney.toString();
    }
}
